package com.suredy.app.porject.constants;

import org.apache.commons.lang3.StringUtils;

/**
 * 报价方式
 * 
 * @author VIVID.G
 * @since 2016-1-12
 * @version v0.1
 */
public enum QuotationType {

	TOTAL("总价"),

	SINGLE("单价"),

	DROP_POINT("降点"),

	;

	private String value;

	private QuotationType(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public final static QuotationType getByValue(String value) {
		if (StringUtils.isBlank(value))
			return null;

		for (QuotationType qt : QuotationType.values()) {
			if (qt.getValue().equals(value))
				return qt;
		}

		return null;
	}

}
